//进行异步AJAX请求
function serviceRequest(url, param, succ, fail) {
    if (!fail) {
        fail = function () {
            alert("系统忙，请稍后再试");
        };
    }
    if (!succ) {
        succ = function () {
        };
    }

    $.ajax({
        url: url,
        async: true,
        type: "post",
        timeout: 60000,
        dataType: "json",
        data: param,
        success: succ,
        error: fail
    });
}

//进行同步AJAX请求
function serviceSyncRequest(url, param, succ, fail) {
    if (!fail) {
        fail = function () {
            alert("系统忙，请稍后再试");
        };
    }
    if (!succ) {
        succ = function () {
        };
    }
    return $.ajax({
        url: url,
        async: false,
        type: "post",
        timeout: 60000,
        dataType: "json",
        data: param,
        success: succ,
        error: fail
    });
}
function serviceRequestSync(url, param, succ, fail) {
    if (!fail) {
        fail = function () {
            alert("系统忙，请稍后再试");
        };
    }

    if (!succ) {
        succ = function () {
        };
    }

    $.ajax({
        url: url,
        async: false,
        type: "post",
        timeout: 60000,
        dataType: "json",
        traditional: true,
        /*contentType: "application/json",*/
        data: param,
        success: succ,
        error: fail
    });
}